package com.xmut.dao;

import com.sirdc.modules.core.dao.GenericQuery;
import com.sirdc.modules.core.dao.LongDao;
import com.xmut.entity.Topic;
import com.xmut.filter.TopicFilter;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 *
 */
@Repository
public class TopicDao extends LongDao<Topic>{

    public List<Topic> query(TopicFilter filter) {
        GenericQuery query = createQuery("obj");
        return query.listResult(filter);
    }

    public int queryNumber() {
        GenericQuery query = createQuery("obj");
        return query.count();
    }
}
